package lf39.smptools;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class Hello {
    @RequestMapping(value = "/hello")
    @ResponseBody
    public ModelAndView hello(Model model) {
        String name = "spring-boot";
        model.addAttribute("name", name);
        return new ModelAndView("hellomodel/hello");
    }
}
